home *** CD-ROM | disk | FTP | other *** search
/ The X-Philes (2nd Revision) / The X-Philes Number 1 (1995).iso / xphiles / hp48hor1 / mapd.doc < prev    next >
Text File  |  1995-03-31  |  2KB  |  61 lines

  1. (Comp.sys.handhelds) 
  2. Item: 3947 by _sun1 at hpcvbbs.cv.hp.com 
  3. Author: Scott Ferry  (415) 845-1088 
  4.   Subj: USA GROB (huge) w/ latitude/longitude output 
  5.   Date: Sat Sep 07 1991 
  6. (Donated to Goodies Disk Project at the Corvallis Conference 8/4/91) 
  7.  
  8. [Note: MAPD is over 14K long.  See MAPD2.DOC for a way to to run MAPD 
  9.  in only 5K.  -jkh-] 
  10.  
  11. MAPD is a directory containing: 
  12.  
  13.      MAP 
  14.      USGROB 
  15.      MAPX 
  16.      FIX2 
  17.  
  18.      The program `MAP' runs the whole thing.  When you run it, it 
  19. calls up USGROB, a huge (424x262) GROB of the 48 contiguous United 
  20. States.  Scroll around (using the arrow keys and blue shift) 
  21. until you get the part of the country you're interested in, then 
  22. press [left-shift] GRAPH.  The cross-cursor appears.  Now move that 
  23. around until you get it directly over the place you're interested in 
  24. and press [ENTER] followed by [ATTN].  The longitude and latitude 
  25. will appear on the stack, tagged.  (Accuracy about 1/2 degrees). 
  26.  
  27. `MAP' is written in system RPL and mainly puts the GROB into 
  28. PICT, etc.,  sets up the PPAR, and then lastly calls `MAPX'.  This 
  29. routine is a small part of a 51K library I wrote that does a lot 
  30. of stuff and is intended for a 128K ROM card.  Since there will be 
  31. plenty of space on the card I didn't use PGROB and UPGROB [by Erik 
  32. Bryntse; see PGROB.DOC on this disk.  -jkh-] in the interest of time 
  33. and safety.  But it is certainly amenable to these programs (it 
  34. cuts the size in half). 
  35.  
  36.      `MAPX' does the conversion from user coordinates to latitude 
  37. and longitude, and is written in user RPL, this being plenty fast 
  38. enough.  I basically figured it out by some math and a lot of 
  39. trial and error, so it will, perhaps obviously, not work with 
  40. any other map. 
  41.  
  42.      `MAPX' calls `FIX2', a system RPL program to properly round 
  43. an HMS format number to 2 decimal places.  E.g.: 
  44.  
  45.      15 35' 34.2" => 15.35342 -> 15.36 
  46.      15 35' 30"   => 15.353   -> 15.35 
  47.      15 35' 29.9" => 15.35299 -> 15.35 
  48.      15 59' 30"   => 15.593   -> 16 
  49.  
  50. and similarly for negative values. 
  51.  
  52.      Make sure you have a real number on the stack if you call 
  53. the program alone. 
  54.  
  55. These programs are copyrighted, but may be used in any non-commercial, 
  56. non-astronomy related program without further permission needed. 
  57.  
  58. They were written and tested on a Version E machine. 
  59.  
  60.                Good Luck, Scott 
  61.